package com.xianyun.book.common.constant;

/**
 * 通用常量信息
 *
 * @author Mac_zyj
 */
public class Constants
{
    /**
     * UTF-8 字符集
     */
    public static final String UTF8 = "UTF-8";

    /**
     * GBK 字符集
     */
    public static final String GBK = "GBK";

    /**
     * http请求
     */
    public static final String HTTP = "http://";

    /**
     * https请求
     */
    public static final String HTTPS = "https://";


    /**
     * 成功标记
     */
    public static final Integer SUCCESS = 200;

    /**
     * 失败标记
     */
    public static final Integer FAIL = 500;

    /**
     * 格式错误标记
     */
    public static final Integer VALID_ERROR = 400;
    /**
     * 登录成功
     */
    public static final String LOGIN_SUCCESS = "Success";

    /**
     * 注销
     */
    public static final String LOGOUT = "Logout";

    /**
     * 注册
     */
    public static final String REGISTER = "Register";

    /**
     * 登录失败
     */
    public static final String LOGIN_FAIL = "Error";

    /**
     * 当前记录起始索引
     */
    public static final String PAGE_NUM = "pageNum";

    /**
     * 每页显示记录数
     */
    public static final String PAGE_SIZE = "pageSize";

    /**
     * 排序列
     */
    public static final String ORDER_BY_COLUMN = "orderByColumn";

    /**
     * 排序的方向 "desc" 或者 "asc".
     */
    public static final String IS_ASC = "isAsc";

    /**
     * 验证码 redis key
     */
    public static final String CAPTCHA_CODE_KEY = "captcha_codes:";

    /**
     * 验证码有效期（分钟）
     */
    public static final Integer CAPTCHA_EXPIRATION = 2;

    /**
     * 参数管理 cache key
     */
    public static final String SYS_CONFIG_KEY = "sys_config:";

    /**
     * 字典管理 cache key
     */
    public static final String SYS_DICT_KEY = "sys_dict:";

    /**
     * 资源映射路径 前缀
     */
    public static final String RESOURCE_PREFIX = "/profile";

    /**
     * 四种常见的 POST 提交数据方式
     */
    public static final String ENCTYPE_JSON = "application/json";

    public static final String ENCTYPE_PLAIN = "ext/plain";

    public static final String ENCTYPE_FORM_DATA = "multipart/form-data";

    public static final String ENCTYPE_FORM_URLENCODED = "application/x-www-form-urlencoded";

    /**
     * XMLHttpRequest
     */
    public static final String XML_HTTP_REQUEST="XMLHttpRequest";

    public static  final String LOCAL_HOST_IP ="127.0.0.1";

    /**
     * 常用数字
     */
    public static final Integer ZERO = 0;

    public static final Integer ONE = 1;

    public static final Integer TWO = 2;

    public static final Integer THREE = 3;

    public static final Integer FOUR = 4;

    public static final Integer FIVE = 5;

    public static final Integer SIX = 6;

    public static final Integer SEVEN = 7;

    public static final Integer EIGHT = 8;

    public static final Integer NINE = 9;

    /**
     * 常见后缀
     */
    public static final String JSON = ".json";

    public static final String XML = ".xml";

    /**
     * 常用分隔符
     */
    public static final String  SPOT = ".";

    public static final String UNDERLINE = "_";

    /**
     * 各种数值上限
     */

    /**
     * TINYINT:1字节,非常小的正整数
     */
    public static final Long UNSIGNED_TINYINT_MAX = 255L;

    public static final Long SIGNED_TINYINT_MAX = 127L;

    public static final Long SIGNED_TINYINT_MIN = -128L;
    /**
     * SMALLINT:2字节小整数
     */
    public static final Long UNSIGNED_SMALLINT_MAX = 65535L;

    public static final Long SIGNED_SMALLINT_MAX = 32767L;

    public static final Long SIGNED_SMALLINT_MIN = -32768L;
    /**
     * MEDIUMINT:3字节 中等大小的整数
     */
    public static final Long UNSIGNED_MEDIUMINT_MAX = 16777215L;

    public static final Long SIGNED_MEDIUMINT_MAX = 8388607L;

    public static final Long SIGNED_MEDIUMINT_MIN = -8388608L;
    /**
     * INT:4字节 标准整数
     */
    public static final Long  UNSIGNED_INT_MAX = 4294967295L;

    public static final Long  SIGNED_INT_MAX = 2147482647L;

    public static final Long  SIGNED_INT_MIN = -2147483648L;

    public static final String POST ="POST";

    public static final String GET = "GET" ;

    public static final String OPTIONS ="OPTIONS";
}
